package com.learn.server;

import com.common.utils.Canca;
import com.learn.mapper.VideoChangeMapper;
import com.learn.server.impl.VideoChangeServerImpl;
import com.tencentcloudapi.asr.v20190614.models.TaskStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VideoChangeServer implements VideoChangeServerImpl {

    @Autowired
    private VideoChangeMapper videoChangeMapper;

    @Override
    public void insertTask(TaskStatus taskStatus) {
        videoChangeMapper.insert(taskStatus);
        Long userId = Canca.getUserId();
        videoChangeMapper.insertContact(taskStatus.getTaskId(),userId);
    }

    @Override
    public String selectText(Long taskId) {
        return videoChangeMapper.selectTexts(taskId);
    }
}
